﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Master/Site.Master" AutoEventWireup="true" CodeBehind="statetypemanage.aspx.cs" Inherits="聚欣订单分析.OrderAna.statetypemanage" %>

<%@ Register Assembly="DevExpress.Web.v18.1, Version=18.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web" TagPrefix="dx" %>



<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="CPH_NAV" runat="server">
    <h2>跟踪状态管理</h2>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="CPH_Contents" runat="server">
    <div class="content-page">
        <div class="content">
            <div class="am-g">
                <!-- Row start -->
                <div class="am-u-sm-12">
                    <div class="card-box">
                        <table>
                            <tr>
                                <td>
                                    <dx:ASPxButton ID="btnAdd" runat="server" Text="新增状态" OnClick="btnAdd_Click"></dx:ASPxButton>
                                </td>
                            </tr>
                        </table>
                        <br />
                        <dx:ASPxGridView ID="ASPxGridView1" Width="100%" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1" KeyFieldName="ID" OnRowValidating="ASPxGridView1_RowValidating">
                            <Columns>
                                <dx:GridViewDataTextColumn FieldName="ID" ReadOnly="True" VisibleIndex="0" Width="40px">
                                    <EditFormSettings Visible="False" />
                                </dx:GridViewDataTextColumn>
                                <dx:GridViewDataTextColumn Caption="项目类型" FieldName="stateValue" VisibleIndex="2">
                                </dx:GridViewDataTextColumn>
                                <dx:GridViewCommandColumn Caption="编辑操作" VisibleIndex="13" Width="90px" ShowEditButton="true" ShowDeleteButton="true" ShowUpdateButton="true" ShowClearFilterButton="true">
                                </dx:GridViewCommandColumn>
                            </Columns>
                            <SettingsBehavior ConfirmDelete="true" />
                            <SettingsEditing EditFormColumnCount="1" />
                            <SettingsText FilterBarClear=" " FilterBarCreateFilter="自定义查询" GroupPanel="将列标题拖拽此处可以分组统计" ConfirmDelete="删除会影响项目信息，确认删除吗？" />
                            <SettingsPager PageSize="20" AlwaysShowPager="True">
                            </SettingsPager>
                        </dx:ASPxGridView>
                    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:JXDDConnectionString %>"
                    DeleteCommand="DELETE FROM [statemanage] WHERE [ID] = @ID"
                    InsertCommand="INSERT INTO [statemanage] ([stateType], [stateValue]) VALUES (@stateValue, @stateValue)"
                    SelectCommand="SELECT * FROM [statemanage] ORDER BY [ID] DESC" UpdateCommand="UPDATE [statemanage] SET [stateValue] = @stateValue WHERE [ID] = @ID">
                    <DeleteParameters>
                        <asp:Parameter Name="ID" Type="Int32" />
                    </DeleteParameters>
                    <InsertParameters>
                        <asp:Parameter Name="stateValue" Type="String" />
                    </InsertParameters>
                    <UpdateParameters>
                        <asp:Parameter Name="stateValue" Type="String" />
                        <asp:Parameter Name="ID" Type="Int32" />
                    </UpdateParameters>
                </asp:SqlDataSource>
                    </div>
                </div>
                <!-- Row end -->
            </div>
        </div>
    </div>
</asp:Content>
